<?php
$this->breadcrumbs = array(
    'Looking For People' => "index.php?lang={$lang}&r=Jobseeker/List",
    'Client Login'
);
?>
<div class="row-fluid" id="content">
    <div class="span12">
        <form class="form-signin" action="index.php?lang=<?= $lang ?>&r=Client/Login" method="post">
        <div id="login-intro">
            <h2>Client Login</h2>
        </div>
        <!--<h2 class="form-signin-heading">Please sign in</h2>-->
        <input type="text" class="input-block-level" name="Email" placeholder="Email address">
        <input type="password" class="input-block-level" name="Password" placeholder="Password">
        <!--<label class="checkbox">
          <input type="checkbox" value="remember-me"> Remember me
        </label>-->
        <?php if($error==1){ ?>
        <div class="alert alert-error">
            <button type="button" class="close" data-dismiss="alert">&times;</button>
            invalid username or password
        </div>
        <?php } ?>
        <label>
            <span class="retrieve"><a href="#forgot_password" title="Forgot password" role="button" data-toggle="modal">Forgot password?</a></span>
            <!--<span class="register"><a href="index.php?lang=<?= $lang ?>&r=Client/FormRegister" title="Create account to join with us"> Register</a></span>-->
        </label>
        <div class="row-fluid">
            <div class="span6"><input class="btn btn-large btn-block btn-success" type="submit" value="Sign in"></div>
            <div class="span6"><a class="btn btn-large btn-block btn-primary" style="color: white" href="index.php?lang=<?= $lang ?>&r=Client/FormRegister" title="Create account to join with us"> Register</a></div>
        </div> 
      </form>
    </div>
</div>
<div id="forgot_password" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h3 id="myModalLabel">Request password reset</h3>
  </div>
  <div class="modal-body">
    <input class="form-control" placeholder="Enter your E-mail" id="email-repassword" name="email" type="text">
  </div>
  <div class="modal-footer">
    <input class="btn btn-success" type="button" id="repassword" value="Request password reset">
    <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
  </div>
</div>
<div id="result_repassword" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h3 id="">Request password reset</h3>
  </div>
  <div class="modal-body">
      <span id="result_repassword_message"></span>
  </div>
</div>
<script>
$(function(){
   $('#repassword').click(function(){
       var email = $('#email-repassword').val();
       if(email == "")
           return;
       
        $.get("index.php?lang=<?= $lang ?>&r=Client/repassword&email="+email,
        {
        },
        function(data){
            $('#forgot_password').modal('hide');
            $('#result_repassword_message').text(data);
            $('#result_repassword').modal('show');
        }, 'text');
   }); 
});
</script>
<style>
    .form-signin {
        max-width: 300px;
        padding: 19px 29px 29px;
        margin: 0 auto 20px;
        background-color: #fff;
        border: 1px solid #e5e5e5;
        -webkit-border-radius: 5px;
        -moz-border-radius: 5px;
        border-radius: 5px;
        -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.05);
        -moz-box-shadow: 0 1px 2px rgba(0,0,0,.05);
        box-shadow: 0 1px 2px rgba(0,0,0,.05);
    }
    div#login-intro {
        background: transparent url('images/login-icon.png') no-repeat left center;
        padding: 0.312em 0 0.312em 3.125em;
    }
    #content {
        background: #f8f9fa url('images/artwork-pattern.png') repeat-x left bottom;
        border: 1px solid #eeefef;
        padding: 1.875em 0;
    }
</style>